c13453de88c1ea559679b4f3d58fbf7e09def2e1,platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/JavaLikeLangLineIndentProvider.java,JavaLikeLangLineIndentProvider,getIndent,#Project#Editor#Language#number#,76

Before Change


        )) {
          return createIndentData(CONTINUATION, LeftParenthesis);
        }
        else if (getPosition(editor, offset).matchesRule(
          position -> position.before().isAt(BlockOpeningBrace)
        )) {
          return createIndentData(getIndentTypeInBlock(project, language), BlockOpeningBrace);
        }
        else if (getPosition(editor, offset).matchesRule(
          position -> position.before().isAt(Colon) && position.isAfterOnSameLine(SwitchCase, SwitchDefault)
        )) {
          return createIndentData(NORMAL, SwitchCase);
        }
        else if (getPosition(editor, offset).matchesRule(
          position -> position.before().isAt(ElseKeyword)
        )) {
          return createIndentData(NORMAL, ElseKeyword);
        }
        else if (getPosition(editor, offset).matchesRule(
          position -> position.before().isAt(BlockComment)

After Change


            .isAt(BlockClosingBrace))) {
          return myFactory.createIndentCalculator(getBlockIndentType(project, language), IndentCalculator.LINE_BEFORE);
        }
        else if (getPosition(editor, offset).matchesRule(
          position -> position.before().isAt(ArrayOpeningBracket) || position.isAt(LeftParenthesis)
        )) {
          return myFactory.createIndentCalculator(CONTINUATION, IndentCalculator.LINE_BEFORE);
        }
        else if (getPosition(editor, offset).matchesRule(
          position -> position.before().isAt(BlockOpeningBrace)
        )) {
          return myFactory.createIndentCalculator(getIndentTypeInBlock(project, language), position -> {
            position.before().beforeOptional(Whitespace);
            return getOffsetBeforeOptionalParentheses(position);
          });
        }
        else if (getPosition(editor, offset).matchesRule(
          position -> position.before().isAt(Colon) && position.isAfterOnSameLine(SwitchCase, SwitchDefault)
        ) || getPosition(editor, offset).matchesRule(
          position -> position.before().isAt(ElseKeyword)
        )) {
          return myFactory.createIndentCalculator(NORMAL, IndentCalculator.LINE_BEFORE);
        }
        else if (getPosition(editor, offset).matchesRule(
          position -> position.before().isAt(BlockComment)
        )) {
          return myFactory.createIndentCalculator(NONE, position -> position.findStartOf(BlockComment));
        }
        else if (getPosition(editor, offset).matchesRule(
          position -> position.before().isAt(DocBlockEnd)
        )) {
          return myFactory.createIndentCalculator(NONE, position -> position.findStartOf(DocBlockStart));
        }
        else {
          SemanticEditorPosition position = getPosition(editor, offset);
          if (position.before().isAt(RightParenthesis)) {
            int offsetAfterParen = position.getStartOffset() + 1;
            position.beforeParentheses(LeftParenthesis, RightParenthesis);
            if (!position.isAtEnd()) {
              position.beforeOptional(Whitespace);
              if (position.isAt(IfKeyword) || position.isAt(ForKeyword)) {
                SyntaxElement element = position.getCurrElement();
                assert element != null;
                final int controlKeywordOffset = position.getStartOffset();
                Type indentType = getPosition(editor, offsetAfterParen).afterOptional(Whitespace).isAt(BlockOpeningBrace) ? NONE : NORMAL;
                return myFactory.createIndentCalculator(indentType, baseLineOffset -> controlKeywordOffset);
              }
            }
          }